package com.chenchen.tiguan.equipment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenchen.tiguan.equipment.mapper.EquipmentReservationMapper;
import com.chenchen.tiguan.equipment.domain.EquipmentReservation;
import com.chenchen.tiguan.equipment.service.IEquipmentReservationService;

/**
 * 设备预约管理Service业务层处理
 * 
 * @author chenchen
 * @date 2025-04-13
 */
@Service
public class EquipmentReservationServiceImpl implements IEquipmentReservationService 
{
    @Autowired
    private EquipmentReservationMapper equipmentReservationMapper;

    /**
     * 查询设备预约管理
     * 
     * @param reservationId 设备预约管理主键
     * @return 设备预约管理
     */
    @Override
    public EquipmentReservation selectEquipmentReservationByReservationId(Long reservationId)
    {
        return equipmentReservationMapper.selectEquipmentReservationByReservationId(reservationId);
    }

    /**
     * 查询设备预约管理列表
     * 
     * @param equipmentReservation 设备预约管理
     * @return 设备预约管理
     */
    @Override
    public List<EquipmentReservation> selectEquipmentReservationList(EquipmentReservation equipmentReservation)
    {
        return equipmentReservationMapper.selectEquipmentReservationList(equipmentReservation);
    }

    /**
     * 新增设备预约管理
     * 
     * @param equipmentReservation 设备预约管理
     * @return 结果
     */
    @Override
    public int insertEquipmentReservation(EquipmentReservation equipmentReservation)
    {
        return equipmentReservationMapper.insertEquipmentReservation(equipmentReservation);
    }

    /**
     * 修改设备预约管理
     * 
     * @param equipmentReservation 设备预约管理
     * @return 结果
     */
    @Override
    public int updateEquipmentReservation(EquipmentReservation equipmentReservation)
    {
        return equipmentReservationMapper.updateEquipmentReservation(equipmentReservation);
    }

    /**
     * 批量删除设备预约管理
     * 
     * @param reservationIds 需要删除的设备预约管理主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentReservationByReservationIds(Long[] reservationIds)
    {
        return equipmentReservationMapper.deleteEquipmentReservationByReservationIds(reservationIds);
    }

    /**
     * 删除设备预约管理信息
     * 
     * @param reservationId 设备预约管理主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentReservationByReservationId(Long reservationId)
    {
        return equipmentReservationMapper.deleteEquipmentReservationByReservationId(reservationId);
    }
}
